import request from '@/utils/request'

// 查询试题管理列表
export function listQuestion(query) {
  return request({
    url: '/examination/question/list',
    method: 'get',
    params: query
  })
}

// 查询试题管理详细
export function getQuestion(questionId) {
  return request({
    url: '/examination/question/' + questionId,
    method: 'get'
  })
}

// 新增试题管理
export function addQuestion(data) {
  return request({
    url: '/examination/question',
    method: 'post',
    data: data
  })
}

// 修改试题管理
export function updateQuestion(data) {
  return request({
    url: '/examination/question',
    method: 'put',
    data: data
  })
}

// 删除试题管理
export function delQuestion(questionId) {
  return request({
    url: '/examination/question/' + questionId,
    method: 'delete'
  })
}


// 列表
export function getListInfo(query) {
  return request({
    url: '/examination/question/getList',
    method: 'get',
    params: query
  })
}

//查看题组下面已关联题目
export function viewQuestion(query) {
  return request({
    url: '/examination/question/viewQuestion',
    method: 'get',
    params: query
  })
}

//关联题组
export function associationGroup(data) {
  return request({
    url: '/examination/question/associationGroup',
    method: 'put',
    data: data
  })
}


//导入
export function importData(data) {
  return request({
    url: '/examination/question/importData',
    method: 'post',
    data: data
  })
}